package com.mobi.cacti;
//http://gamma-point.com/content/android-how-have-multiple-activities-under-single-tab-tabactivity
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.mobi.cacti.common.Utils;

@SuppressWarnings("deprecation")
public class MainInfoActivity extends Activity{	
	public RelativeLayout rl_mainInfo;	

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		/*
		setContentView(R.layout.atv_main_info);
		try
		{
			MainActivity.btnBack.setVisibility(View.GONE);			
			rl_mainInfo = (RelativeLayout)findViewById(R.id.rl_main_info);			
			
			if(MainActivity.ll_child != null)
				rl_mainInfo.removeView(MainActivity.ll_child);						
			MainActivity.ll_child = new LL_MainInfo(MainInfoActivity.this, null);
			rl_mainInfo.addView(MainActivity.ll_child);
			
			MainActivity.btnRecent.setOnClickListener(new OnClickListener() {				
				@Override
				public void onClick(View v) {
					MainActivity.btnRecent.setBackgroundResource(R.drawable.btn_red_lb);
					MainActivity.btnHistory.setBackgroundResource(R.drawable.btn_red_r);
				}
			});
			
			MainActivity.btnHistory.setOnClickListener(new OnClickListener() {				
				@Override
				public void onClick(View v) {
					MainActivity.btnRecent.setBackgroundResource(R.drawable.btn_red_l);
					MainActivity.btnHistory.setBackgroundResource(R.drawable.btn_red_rb);
				}
			});
							        
	        MainActivity.btnBack.setOnClickListener(new OnClickListener() {
				@Override
				public void onClick(View view) {	
					//Activity act = getCurrentActivity();
					if(MainActivity.lastChildName != null && MainActivity.ll_child != null)
					{
						rl_mainInfo.removeView(MainActivity.ll_child);							
						if( MainActivity.lastChildName.equals("LL_CustInfo")
						|| MainActivity.lastChildName.equals("LL_Ticket")
						|| MainActivity.lastChildName.equals("LL_Contact")){
							MainActivity.ll_recent.setVisibility(View.GONE);
							MainActivity.btnBack.setVisibility(View.GONE);
							MainActivity.ll_child = new LL_MainInfo(MainInfoActivity.this, null);
							rl_mainInfo.addView(MainActivity.ll_child);
			    		}else if(MainActivity.lastChildName.equals("LL_CustInfoCc")){
			    			MainActivity.ll_child = new LL_CustInfo(MainInfoActivity.this, null);
							rl_mainInfo.addView(MainActivity.ll_child);
			    		}else if(MainActivity.lastChildName.equals("LL_TicketCc")){
			    			MainActivity.ll_child = new LL_CustInfo(MainInfoActivity.this, null);
							rl_mainInfo.addView(MainActivity.ll_child);
			    		}else if(MainActivity.lastChildName.equals("LL_ContactCc")){
			    			MainActivity.ll_child = new LL_Contact(MainInfoActivity.this, null);
							rl_mainInfo.addView(MainActivity.ll_child);
			    		}				
					}	    			
				}
			});
		}
		catch (Exception ex)
        {
     	  Utils.catchFn("MainInfoActivity onCreate",ex, MainInfoActivity.this);
        }
        */
	}//end onCreate
	
		
		
	@Override
    public void onBackPressed()
    {    	
    	try
    	{   	
    		return;
    	}
    	catch(Exception ex)
	    {}    	
    	super.onBackPressed();
    }
}
